//
//  FCSelectLanguageCell.m
//  FundChain
//
//  Created by 肖浩然的mac on 2018/3/6.
//  Copyright © 2018年 RUIXIN. All rights reserved.
//

#import "FCSelectLanguageCell.h"

@implementation FCSelectLanguageCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setSubView];
    }
    return self;
}

-(void)setSubView{
    self.titLabel = [UILabel new];
    [self addSubview:self.titLabel];
    [self.titLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(30*KScreenWidthScale750);
        make.centerY.mas_equalTo(0);
    }];
    self.titLabel.font = Kfont(32);
    //image
    self.selectBtn = [UIButton new];
    [self addSubview:self.selectBtn];
    [self.selectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-30*KScreenWidthScale750);
        make.centerY.mas_equalTo(0);
    }];
    [self.selectBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
    [self.selectBtn setImage:[UIImage imageNamed:@"chosen"] forState:UIControlStateSelected];
    
    self.selectImageView = [UIImageView new];
    [self addSubview:self.selectImageView];
    [self.selectImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-30*KScreenWidthScale750);
        make.centerY.mas_equalTo(0);
    }];
    self.selectImageView.image = [UIImage imageNamed:@"chosen"];
    self.selectImageView.hidden = YES;
    
    //分割线
    self.viewLine =[UIView new];
    [self addSubview:self.viewLine];
    [self.viewLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
        make.height.mas_equalTo(1);
    }];
    self.viewLine.backgroundColor =HEXCOLOR(0xe0e0e0);
    
}

//- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
//    [super setSelected:selected animated:animated];
//    self.selectBtn.selected = selected;
//    
//}

@end
